package com.jiadeyu.comm;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

@Data
public class PageQry implements java.io.Serializable {
    private Integer pageNum;
    private Integer pageSize;
    public <T> Page<T> page() {
        if (pageNum <= 0) {
            pageNum = 1;
        }

        if (pageSize <= 0) {
            pageSize = 10;
        }
        return  new Page<>(pageNum, pageSize);
    }
}
